package com.boomsecret.loadservice;

import java.util.ServiceLoader;

/**
 * @author wangjinliang on 2019/1/29.
 */
public class LoadServiceDemo {
    public static void main(String[] args) {
        ServiceLoader<Robot> serviceLoader = ServiceLoader.load(Robot.class);
        serviceLoader.forEach(Robot::sayHello);
    }
}